package com.xtpt.disaster;

import com.xtpt.disaster.utils.SpringUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@MapperScan("com.xtpt.disaster.mapper")
@EnableScheduling
@EnableSwagger2
@EnableCaching
@Import(SpringUtil.class)
public class Application extends SpringBootServletInitializer {

    protected SpringApplicationBuilder config( SpringApplicationBuilder builder){
        return  super.configure(builder);
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}
